basic bovw functions completed