Add realm support