system has two stages: