updated api, added couple of structs