added a new parameter to allow processing blank lines