changed code such that all coordinate computations are carried out with floating point numbers