add maximum size limitation