Submitted code in a separate function.