* set up creditUsage query * rename function name to follow convention * remove unused code * add coipyright * fix linting