change protected modifiers to private, fix methods involved