improving API interface