added public modifier to functions