changed to lib package
made some small changes to increase efficiency
ok
ok
ok
ok