added api
fixed some stuff