changed stopPropagation to event preventDefault