moved js from index to app