Streamline the code