Added bootstrap method and generalized functions