add set pin, read write method