updated viewer so that it works as API