checks and better updating env