made state parser to eventually use strings from command line or files