removed dead code, args in correct order
remove internal function