check in the Commander sample file demonstrating the Command pattern.