added new server side functionality to reduce amount left