STOCHASTIC METHOD FOR CALCULATING WAVE FUNCTIONS.