updated layer clean method

updated layer clean method