added try statement if one page