add compute method