adds my version of forward_propgation - nearly identical to bjoern's solution