wrote documentation in the README, rewrote some of the logic in the apiController