adding in component center detection