All done with first algorithm One bug left