refactor to handle case of only one shift created