added support for input and output prefixes