Named the function, as it was not working in firefox