extend and remove need for matrix