It seems we are duplicating this code as well.