add small extension method for enumerables
add test case for local and global vars in function