added digitArray function to helper and solved problem 20