trying to fix frontprop so it can be integrated with backprop