modified left side and cleaned up code a bit