added 1/5 rule, small optimization