Add dependencies with command and event