simple implementation of fixed depth integer stack