apply impulse
refactoring