styled the sort buttons
added sotring functionality; did some refactoring to guidance and support 2 js