Functions should have their own scope of variables, to ensure pure functions outer scope functions should thrown error