Change function to accept timestamp and resource id parameters