Added the shared functions