New Algorithm code added