add angular services and fix controller