add _opt prefix for inner functions