Add assignment solution
Add comments explaining code