made some functions private (prefixed by '_')