Working version (use with care).