few fix / better api