added misc functions