removing deprecated function calls
removing the raw db call in favor of the class object