checkpoint
almost works, need to catch self case
I think it works now