got database working