getting complex. thinking of simpler solution