adding check in normalize.m