use collect to remove event
refactor classes