implemented TestAdd
moved code out of vm.go into their own respective files