updated api methods to be more java-like