that is why it was fortified in times of the swedish empire during the middle ages