making class for single stack