how invented chess