help function getWorkInterval