additional javascript for UI logic