adding labels logic