add a check to make sure job hasn't been run yet, add some tests