detect vertical motion