Updated shared functions