Added another result variable

Added a result variable for the final result.