working out js compilation issues