added linalg prototype implementation