added code for insert sort instance