an ugly hack