add back layer functionality which disappeared somehow