beginning of portal logic and form