restructure some code

still working on multilingualism