fixed falty database design