added new methods to assignment 2