localize all global functions