adding js functions hw