layout code for att read/write operations