adjusted for library usage rather than standalone