moved print response inside device parsing function, so messages cannot get sent in between.