saving progress
inserted additional class for nested collections
cleaning up the code