modified VLAD encoding part