made some changes to layering