replace Prototype function