change function to static