New loadview function