change qs and qsParse methods to encode and decode