adding class functionality