added 'complete' column to select query