fixed bin command so that an environment can be passed in as an argument