use NUM_PAGES macro & adapt gitignore