complete workable version (no type)