migrate basic vectors to scala