lib: allow adjusting size