added endpoint return on basis of label