MAJOR change switched to javascript for ease