added conditionals to followPath behavior