clean, update and fix code
resolve merge conflict