changed method names to be consistent with java