Added firstOf function
Added get global variable