Bill about api and reformat code