modified calculate long overtime function