better use of set