work on write call; call almost done but check compiler errors