priliminary search by time function implemented