Fixed for existing clients and commented in jsdoc format