New custom viewer api