added tidyr and magrittr