move nib specific code to nib specific method