modifying insert query for subject session