fixed linking error
implemented geometry-type determination