make the functions dynamic