working FIS() function with cleaned up dplyr calls towards end. Resolves #33.