Updated functions to take value parameter instead of it being hardcoded