Duwen,

I cannot figure out that code and it looks like you have posted it correctly (nice photos). Maybe someone will post an explanation/interpretation?