[UPDATE] minor optimizations