changed if then block of memorysize