functions: minor clean up