create dynamic add blocks functionality