added button behavior and the beginnings to process it