corrected Stack class