created code duplication for Portal rendering
WIP