class definition, initialization of vars and construct working