javascript inheritance update