inheritance for javascript