Rewrote prototype based