added require_a checking for function arity and vectors. fixed all tests. ready to merge into dev