cleaned up main for parse