handling multiple components