adjusted to be more suitable for external use