Adjusted to use library