database setup and basic functionality complete