refactor example, fix the http part