setting subject logic