Enhancement smart js functions