Wrap function and place it to the env object