seperated classes and set it up for a database