urlencoding and variable testing