cleaned some codes for time filtering: bug found--> if we choose all tables and duration from 2000 to 2005, rows are duplicated 2 times.