this needs hardcore testing, IMO.