formatting read function for non-leaf node