made functions global