reordered functions to match interface