Implementation of functions required for Assignment