comments inside main function
Added pager check