format code and add extend prototypes:true