Not sure if this is a better way