finally figured out how to get buttons to work properly