complete geeraly encode()/decode()
long logn timeAgo added to decode/encode