changed method names for JS