made api service working