placed javascript in separate file