adjusted initialization of JS var app