fixed comments + made functions private