Added options logic for passing in a function

this allows for dynamicly writing options with the input value.