reorganized code a bit, added max pool forward propagate