updated the query function to handle black properties