changed to pass id_name of component, instead of type
Automatic style corrections courtesy of autopep8