Made the solution much more generic and
Made the solution much more generic and scalable.