changed button names to zero-based ids for convenience