added @rpath for embedding
added array access
handling newlines as whitespace