improve api a bit