completed final acceptance test and refactored into postfix algorithm