generalized setup