- added checking method for sorting algorithms