adjusted variable and query for weekly