Added calc of maxitem