move to using timestamp from DB