Added functions for calculation of new values for density and coordinates