added the ability to choose the number of keys per task