now seems to be working as desired