(regesm) : update code for wave coupling. still needs work.