trimmed out excess, added prototype.