mv to root
added environment detection