finished tests and code for buttons control