switching api a bit. feedback welcome