add misc functions