now uses classes instead of class