restructured input options and hash function looping over input