more work moving logic around