for javascript class