cleaned up lib