added guard and spork for ease of testing