added hook for environment