Fixing identation , variables name , code optimized by changinf the addto list function