changed to two memorys