use more complicated sort
minor change
some changes
remove debug
clean up parser