minor simplification + performance improvement