fixed query.
prefixed protected method names with an underscoe to bring them in line with the coding standards.