improve extends method