modify API slightly