Now handles packages with linebreak but is a bit slow