changed vars and added in it the other globals