generalized flash method