convert loose function to static