shrink code a little