merge with master (and first attempt to write a testcase)