fixing arrow keys and adding obstacles to data