added slider calc funtion
fixed time calculation bug for progress bar