creating objects in constructor (shared variables)