stack implementation v1 (3334144b / 98ms)