added all necesarry functions within this module
moved old matjams functions to dev folder for reference