made a few functions more succinct
modified if then else to fix cabal error
added proper dependencies