adds buttons, minor error control