refactor and some controller events
refactor and some controller events