for Javascript class