minor refractoring of api methods