api update, some improvements