Had to change function to be static