Add BoW code