making a reusable lib