james' code + yiming's change to remove pause in arrow mvmt