Modified Functions to accept dynamic values