adding class earlier