changed type for ID from int to long so there won't be any issues when ID > 65536