adjusted to new interfaces