adding insert sort and documentation