fix little issues, add solutions in comments
work