remapped $this to $self inside function bodies