updated some library code