fix self attributes
implements loops