added loader function to slow loading pages