Removed a small error

applied encapsulated variables to newly merged code