coded most of the buttons