solved Stack Implementation