Added non-working function to main.js