messy parsing of application