added some additional apis and made return values more consistent