How does portal work?