Add logic for options from code