modified gah dai logic