moving lenv to help with location structure in a hugely messy file
functions for finding and adding to the environment