A SAT approach for solving the nurse scheduling problem