helping code now works for 3 directions, will test the other 5 directions later. Should work for them though