refactored the #&*&* out of the models