Functions done! Revision pending.