change viewId to viewKey