changed magrittr to importfrom pipe operator instead of all fxns as clash with testthat