Added functionality of generating the sorting engine