Updated to use angular variables