pull out into it's own method