finished adding sorting functions.
still need to add iteration code and timing analysis code.