Distribution of lattice points on surfaces of second order