converted all variables to private