initial commit

misc functions