removed errorlog and added group by statement to prevent dubs