ajax no longer needs page refresh

fixed the bug