first few pages refactored