make variables protectedto reduce need for friend decl