implemented match log and refactored commands