pass $ to functions