-add direction calculation and crystal moving