add tests and local connection to database