How to implement dynamic initial values