changed public interface to compute