streamlining code for our use case