improve style, simplify a bit