changed timline sampling algorithm