Added initial feature for portal replacement