some modifications, basic functionality tested. Small modifications here and there needed