gui stuff implemented, sorting bug fixed