move the adding non existing options code to function option