See above. Looks like very similar code to me. Maybe extract into a common method?