reworked dynamic buttons to correctly save previously stored information when redrawing