added brackets to branch statements
added gitignore
frequency sorting almost working, some bugs still