move posvec to desmath module
reduce vars