javascript structuring
js structure