Amanda - adding code for option and either