forgot to initialize movement_function as an array