credit assignment infrastructure done; just need to implement algorithm