made function global