finished a few more methods in the main and database classes