improving manager class for db models