simple method of setting view