added leaf pointer
updated with support for read / write