Branching random walk in varying environments