added $components variable