func should be first to allow do-block notation