added right_left fields for ranking and updated SQLCommands accordingly