added another case in forward pass