think i got it to work with pretty hacky js, not proud of it