refactored code to remove the put method which was fudging test returns