#14 #5 #7 function to retrieve label from database