amount = nil case added, class variable name changed, refractoring done