a separate js for layout page