Small Changes to the database method.