todo is fixing freemarker,javascript and server communication