insertionsort implemented and tested