Added function to help query