some var names changed