update with my comments and rebase to 5.7b0