added environment() function
merging