Any reason for having this logic duplicated?