Added incrementing by 'k' rather than 1