moved format definition to main, added initiazation methods in app