Merge pull request #1 from helenphillips/fixingbuild

changing to ifelse function
fixing function call
Merge pull request #2 from helenphillips/fixingbugs

fixing function call
not sure what I am commite
my repo merge