updated to include more variables