Streamlining the code