forward layer implemented