refactor initialize method to make it more restrictive
return stack output at the end of the run as a hash