require  object as parameter for constructor