duplicated js implementation removed