Additional functions to main.js