Calculating end stack, floating coma problem, but seems not too bad otherwise