added some fields and some js functionality