Example 4: how to take the slit into account