adding environment parameters and fixing situation when already is in use