Updated for new environment