Moved logic from dataaccess to business