added layer wise example