added toggle layer functions