edit javascript functions