database working and tests passing