more api's and fixes