js work in progress