recursive version
remove emty line