updated api. pretty much done for now