refactor and fix style