self and view may not be defined