Updated to use defined constants