added layer functions