Added a bark function that takes a times parameter