* moved work with input options to functions