Added functionality to AddPanel