50 points (my time 3 hours!!!) Solution