trying to simplify and clean up (not working)