moved places to separate js