added example.m and bugfixed some naming