final changes in parse and main