adding method to class