Not the most intelligent way to find a frame around the components but works somewhat