adding conditionals around when to run