fixed referencing environment bug and added example to README