environment type implemented
adding possibility to defining functions
refactoring