refactored isPrivate->isPublic, and small bugs