refactor lablesCompunents function

use $container var to find elemens