option as function fix