adding SRM 626 solution. First time solved all :)