Editing database return command

returning in an object oriented way