finished getting database buttons work