code factorisation for adding elements to the environment