add tail and head to vector