improve API