added debug to portal