pushing loggic to models, easier handling