implemented all test cases; removed require that was causing scope issues in angular