Some helpful functions used in this tool