REFACTOR: time is stored as unix timestamp in secs