clean api a little bit