Let's change tmp here to a long