testing various javascript functions