Change back to using javascript