added local environment support