updated DB class and User class.