yeah I should have noticed too. also 'hash' and 'attr' don't exist in this scope (due to copy paste).