cleaned up code a bit
made tread run in both directions