added factory, service and finished the app