fix can not extend prototype function