modified to handle angular the right way