replaced the flags with the arg hash - much simpler.