split special case code into separate files