some little bugs & uncommit changes done by yourself, please the newline-changes