updated buildUrlQuery to work better with and without additional GET parameters
fixed bug in getting invalid steps