new input and new movement curtesy of Richie