Added a function to extract attributes of hits