fix variable names, change getelementbyid to $