Fittness function, printStack corrected