adding some changes and a script for querying