working version, no default term