refactor - modify arpa store and query - update sql script.