big refactor, using fragments now