committing dbGateway class, added method to mainactivity