updated api URL and added ability to pass options to request