fixed the extend method error