bugix in function.js that deleted console message
old code styling changed in response