undefined vars issue
stupid nilClass