refactor and delete bill