Using constructor to define environment