added timestamp and check duplicated entry