first uncomplete version of core-functions.