refactor encyclopedia