split into 2 js files