changed $ENV to $SERVER