cleanup prints and use correct function name