adding solution for a few problems