updated api functionality