Adding selection sort code