Contains probably isnt the best option for checking if the size is empty.  Added a check to make sure that there is a space before 0, so that you dont have to worry about sizes of stacks with a 0 in the number.

SFH