Rewrote in javascript.