Remove debug and change function name