Use List.splitAt() instead of custom method divideList