added reset function to layout