made a class for the obstacles