More flexible js