Added variables & log function