Updated code based on client feedback