changed a function to private.