changed model structure to make cleaner