made viewer do all the work