modified library to reduce imports