console input is now safe, code made more flexible to further changes (console arguments etc)