started work on streamlining this