add default option and fixd extend method