makeup code, fix usability and bugs