Add return previous layer for each layer