Use reference of ctx, and formating a little bit