changed for assigning 0s for memset call