Code from Database Class