working auction algorithm