merge some changes from the arch branch