improving edges_alive
improved mean and std
fixed a few things about coding style