debug previous problem by using frank's sol.