Version with edges and points not working