put upper limit on number of shapes found