js code close to get the customisation working