change the underlying implementation with js