Version 2. Problem with write. Working on it.