adjust some ofht estuff for js