working program
working on difficulty function