credit added and function name fix