Added implemenetation of methods and comments