last bit of lib stuff