added difficulty var and stopped 0/0 error