potentially functioning group condition solver with placeholder for specs
add working algorithm and passing rspec tests