Simplified the re code.