More or less rewrite.... ;)