implementation of multiple stack