udpates layers