optimizing panel placement