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