before adding forward layer