recursive extend