Function to its own file
TODO