Defined function instead of hard coding it.