updated temp query and added values