added support to query events according to being complete or not