fixed tests and sample, returned to the old design