rework index and main with hiding pages