remove bin and refactor

remove bin and refactor