I think I'm to dumb to implement this, without writing it completely new...