moved in appropriate thread