mali refactor
debug