changed solve function to void signature at request of stackoverflow user