added some more output and alternative formula