backend implementation of dynamic buttons