nicer API code