handle modified variables
tried to fix it