vector detection with dictionary