support readonly mode