adding env parameters and correction of mistakes