aligned code, added urldecode