Add function to global scope