Added sorted insert capability