calculate right times