Define set option function in traits