Distance magic graphs