added function access levels

pretty sure it works (it does for me) but test it first