Added all functions needed