re-structure script - using functions
Merge branch 'master' of https://github.com/alexandru-iacob/server_scripts