<imp> replaced loops with memset