Improve readability of set method