fix precedence and add optional verbose argument