refactor code to be less redundant

This removes some duplicate code by introducing another instance method. Also update the unfinished specs to reflect this.