fixed status computation for remaining leaves
modified application for ao