added the magic number calculation but I get the wrong number