added vars and logic to set them