Changed to using query parameters