refactor demo page