Change the code to use angular module way