code cleanup, fixed function name mismatch