added propagate.[ch]pp files
moved propagation to separate function