adding more logic and variables