use vec rather than apply vector