added javascript to work the form