done middle part of right to left energy evalution