- changed structure
- added functions and variable templates