updated with debugging block, revised checks for user URL parameters