Insert sort of working