added classes and objects solution