refactor with tonumber