improved security service api+impl