was redoing things, but I think there is a better way to structure this in general