added proper class creation with blocks