Updated function definitions