pseudo code of computational approach