changing to ifelse function
Merge pull request #6 from seantuck12/fixingbuild

changing to ifelse function to allow build