making function global (again)