finished fixing things and program is functional as before, with hand class implemented and clean code
writing results to file implemented