strangeness, this needs a rewrite really