making use of postgres timestamps