i need a better way to do this