remove R codes for parsing, migrate to bash instead