more practice with js functions