extra javascript functions