A solution for staff scheduling