refactor the structure to make bootstrap works