this is a better way to do it