implement jjubenv's suggestions