code duplication with snippet method?