added realm variable