figure out function function and make stuff private