modified form. Fixed JS